<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <style type="text/css">
        .errorlist {
            color: red;
        }
    </style>
</head>
<body>

    <h3>用户登录</h3>
    <form action="." method="post">
        {% csrf_token %}
{#        {{ form.as_p }}#}
        <div>
            {{ form.username.label }}
            {{ form.username }}
            {{ form.username.errors.as_text }}
        </div>
        <div>
            {{ form.password.label }}
            {{ form.password }}
            {{ form.password.errors.as_text }}
        </div>
        <div>
            {{ form.non_field_errors }}
        </div>
        <input type="submit" value="登录">
    </form>
</body>
</html>